# Contributor: Tom <tomgparchaur@gmail.com>
pkgname=spindown
pkgver=0.4.0
pkgrel=1
pkgdesc="Daemon that spins down idle disks."
arch=('i686' 'x86_64')
url="http://code.google.com/p/spindown/"
license=('GPL3')
depends=('sg3_utils')
backup=('etc/spindown.conf')
source=("http://spindown.googlecode.com/files/${pkgname}-${pkgver}.tar.gz"
	"spindown.rc")

build() {
  cd ${srcdir}/${pkgname}-${pkgver}
  make || return 1
  make DESTDIR=${pkgdir} install || return 1
  rm -rf ${pkgdir}/etc/*
  install -m 644 ${srcdir}/${pkgname}-${pkgver}/spindown.conf.example \
  ${pkgdir}/etc/spindown.conf || return 1
  mkdir -p ${pkgdir}/etc/rc.d/
  install -m 755 ${srcdir}/spindown.rc ${pkgdir}/etc/rc.d/spindown || return 1
}

md5sums=('9ec7400cdd6540a404039492291f41cf'
         '141a8a78ceb8ac4cf88bfedb35133f94')
